Misconfiguration of an electronic device, such as a microcontroller, can cause significant wasted energy. For example, if a pin, such as a general-purpose input-output (GPIO) pin, is configured with an internal pull-up or pull-down resistor, or if it is driven so that current flows through the external circuit, then this disadvantageously consumes energy resulting in undesired energy consumption. Such a misconfiguration may also, for example, cause a peripheral to remain powered on even if it is not used. Considerable energy losses can be caused by such accidental misconfigurations, and can go undetected, potentially for a device's lifetime; this is clearly undesirable.